package com.gongj.aop.annon;

import com.gongj.aop.YuanInterface;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class AppMain {

	public static void main(String[] args) {
		AnnotationConfigApplicationContext context =
				new AnnotationConfigApplicationContext(AppConfig.class);
		//获得代理对象
		YuanInterface yuanInterface = context.getBean("gongService", YuanInterface.class);
		yuanInterface.getUserInfo("程序员小杰");

		yuanInterface.findById(5L);
		System.out.println(yuanInterface.getClass().getName());
	}
}
